package com.jxcq.tensquare.friend;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import util.JwtUtil;

import java.text.SimpleDateFormat;
import java.util.Date;

@Slf4j
@EnableDiscoveryClient
@EnableFeignClients
@SpringBootApplication
@EnableEurekaClient
public class FriendApplication {

  public static void main(String[] args) {
    SpringApplication.run(FriendApplication.class, args);
    log.info(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "Friend服务启动完成并成功!!!!!!!!");
  }

  @Bean
  public JwtUtil jwtUtil() {
    return new JwtUtil();
  }

}
